import { createRouter, createWebHistory } from 'vue-router';
import Home from '../views/customer/userView.vue';
import Orders from '../views/customer/orderView.vue';
import Login from '../views/Login.vue';
import AIChat from '../views/customer/aiView.vue';
import status from '../views/staff/statusView.vue'
import appointment from '../views/staff/appointmentView.vue'
import staffOrders from '../views/staff/odersView.vue'



// 定义路由数组
const routes = [
  {
    // 登录页面
     path: '/',
     component: Login,
     name: 'Login'
  },
  {
    // 客户端主页
     path: '/customer/home', 
    component: Home,
    name: 'Home', 
  },
  {
    // 订单页面
     path: '/customer/orders',
     component: Orders,
     name: 'Orders'
  },
  {
    // AI智能助手
    path: '/customer/ai',
    component: AIChat,
    name: 'AiView'
  },
  {
    // 状态管理
    path: '/staff/status',
    component: status,
    name: 'statusView'
  },
  {
    // 预约管理
    path: '/staff/appointment',
    component: appointment,
    name:'appointmentView'
  },
  {
    // 订单管理
    path: '/staff/orders',
    component: staffOrders, 
    name: 'staffOrdersView'
  },
  {
    // 管理员页面
    path: '/admin/meeting-rooms',
    component: () => import('../views/admin/AdminDashboard.vue'),
  },
  {
    path: '/admin/users',
    component: () => import('../views/admin/StaffManageView.vue'),
  }
];

// 创建路由实例
const router = createRouter({
  history: createWebHistory(), // 使用 history 模式
  base: '/',
  routes,
});

export default router;